home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Web Graphics with Shout 3D
/
Interactive Web Graphics With Shout 3D.iso
/
mac
/
Shout3Ddemo
/
Shout3d_runtime
/
codebase
/
models
/
TimeSensorPauserTest.s3d
< prev
next >
Wrap
Text File
|
2000-05-30
|
3KB
|
119 lines
#VRML V2.0 utf8
WorldInfo {
title "Spazz3D"
info [
"This VRML World was created with Spazz3D, a VRML 97 authoring tool"
"www.spazz3d.com"
]
}
DEF DUMMY Transform{
children[
DEF dad_Box1 Transform {
translation -1.87176 0.86 0.0
rotation 0.865 0.503 0.0 0.684
children [
DEF BOX1_TOUCHSENSOR TouchSensor{}
DEF Box1 Shape {
appearance Appearance {
material DEF Red_mat Material {
diffuseColor 1.0 0.0 0.0
}
}
geometry DEF BOX_IFS IndexedFaceSet {
solid TRUE
creaseAngle 1.047
coord Coordinate {
point [
-0.50000 0.50000 -0.50000
-0.50000 0.50000 0.50000
0.50000 0.50000 0.50000
0.50000 0.50000 -0.50000
-0.50000 -0.50000 -0.50000
-0.50000 -0.50000 0.50000
0.50000 -0.50000 0.50000
0.50000 -0.50000 -0.50000
]
}
coordIndex [
0 1 2 -1
0 2 3 -1
1 5 6 -1
1 6 2 -1
2 6 7 -1
2 7 3 -1
3 7 4 -1
3 4 0 -1
0 4 5 -1
0 5 1 -1
6 5 4 -1
6 4 7 -1
]
}
}
]
}
]
}
Transform{
translation 0 0 0.0
children DEF START_TOUCHSENSOR TouchSensor {
children DEF BUTTON Shape {
appearance Appearance {
material Material {
diffuseColor 0 1.0 0.0
}
}
geometry USE BOX_IFS
}
}
}
Transform {
translation 2.5 0 0.0
children DEF STOP_TOUCHSENSOR TouchSensor {
children USE BUTTON
}
}
Transform {
translation 5 0 0.0
children DEF PAUSE_TOUCHSENSOR TouchSensor {
children USE BUTTON
}
}
Transform {
translation 7.5 0 0.0
children DEF RESET_TOUCHSENSOR TouchSensor {
children USE BUTTON
}
}
DEF Light1 DirectionalLight {
ambientIntensity 0.000
intensity 1.000
direction 0.99489 0.08952 0.04676
color 1.0 1.0 1.0
on FALSE
}
DEF ANIMATION TimeSensor{cycleInterval 1 loop TRUE}
DEF INTERP PositionInterpolator {
key [0 0.5 1]
keyValue [ 0 0 0 0 1 0 0 0 0 ]
}
ROUTE ANIMATION.fraction TO INTERP.fraction
ROUTE INTERP.value TO DUMMY.translation
DEF TIME_SENSOR_PAUSER TimeSensorPauser{
timeSensor USE ANIMATION
}
DEF TOGGLE Toggle{}
DEF DOUBLE_TO_BOOLEAN DoubleEventToBoolean {}
# This will toggle the ANIMATION TimeSensor paused
ROUTE PAUSE_TOUCHSENSOR.touchTime TO TOGGLE.toggleTime
ROUTE TOGGLE.toggleValue TO TIME_SENSOR_PAUSER.setPaused
ROUTE RESET_TOUCHSENSOR.touchTime TO DOUBLE_TO_BOOLEAN.doubleField
ROUTE DOUBLE_TO_BOOLEAN.booleanTrueField TO TIME_SENSOR_PAUSER.reset
ROUTE START_TOUCHSENSOR.touchTime TO ANIMATION.startTime
ROUTE STOP_TOUCHSENSOR.touchTime TO ANIMATION.stopTime